package com.ecube.maintenance.biz.commons;

/**
 * Created by Trible Chen on 2014/9/5.
 */
public class ICTException extends Exception {

    public static final int E_APP_OK = 10000;  //执行正常
    public static final int E_APP_REQFAILED = 10001;    //请求失败
    public static final int E_APP_EXECERR = 10002;     //执行错误
    public static final int E_APP_INVALIDREQPARAMS = 10003; //非法的请求参数结构
    public static final int E_APP_NOTLOGIN = 10004;   //未登录
    public static final int E_APP_USERNOTEXISTS = 10005; //用户不存在
    public static final int E_APP_USERPWDERROR = 10006;  //登录密码错误
    public static final int E_APP_REQDATAISNULL = 10007; //请求内容为空
    public static final int E_APP_REQNOTSUPPORT = 10008; //该请求暂不支持
    public static final int E_APP_UNKNOWNREQCMD = 10009; //无法识别的请求命令
    public static final int E_APP_INSERTFAILED = 10010;  //插入记录失败
    public static final int E_APP_INVALIDOLDPWD = 10011; //旧密码不对
    public static final int E_APP_USERNAMEEXISTS = 10012; //用户名已存在
    public static final int E_APP_NORECORD = 10013;    //查询无记录
    public static final int E_APP_RECEXISTS = 10014;   //记录已存在

    long messageCode;
    String message;

    public String getMessage() {
        return message == null?"":" "+message+" ";
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public ICTException() {
    }


    public long getMessageCode() {
        return messageCode;
    }

    public void setMessageCode(long messageCode) {
        this.messageCode = messageCode;
    }

    public ICTException(String detailMessage) {
        super(detailMessage);
        setMessage(detailMessage);
    }

    public ICTException(String detailMessage, Throwable throwable) {
        super(detailMessage, throwable);
        setMessage(detailMessage);
    }

    public ICTException(Throwable throwable) {
        super(throwable);
    }
}
